<template>
  <div class="box">
    <!-- 左上box -->
    <HerinContainer
      class="MainCoal-box"
      :delay="1"
      direction="Left"
      title="避灾路线统计"
      style="height: 239px"
    >
      <!-- 避灾路线统计 -->
      <div slot="content" class="MainCoal-box-content">
        <div class="sensorSum">
          <p class="sum">
            <img src="@/assets/img/monitor/icon-4.png" alt="" />避灾路线数量
          </p>
          <p>
            <span class="num" style="color: rgba(0, 253, 255, 100)">20</span
            ><span class="piece">条</span>
          </p>
        </div>
        <div class="outage">
          <div v-for="(v, disasterData) in disasterData" :key="disasterData">
            <p class="title">{{ v.title }}</p>
            <p>
              <span class="num">{{ v.num }}</span
              ><span class="piece">条</span>
            </p>
          </div>
        </div>
      </div>
    </HerinContainer>
    <!-- 左下box -->
    <HerinContainer
      class="MainCoal-box"
      :delay="1"
      direction="Left"
      title="井下硐室统计"
      style="height: 731px"
    >
      <!-- 井下硐室统计-->
      <div slot="content" class="MainCoal-box-content">
        <div class="sensorSum">
          <p class="sum">
            <img src="@/assets/img/monitor/icon-5.png" alt="" />硐室数量
          </p>
          <p>
            <span class="num" style="color: rgba(0, 253, 255, 100)">20</span
            ><span class="piece">个</span>
          </p>
        </div>
        <div>
          <div class="cont" v-for="(v, chamber) in chamber" :key="chamber">
            <div class="bord"></div>
            <div class="head">
              <p class="title">{{ v.title }}</p>
              <p class="show">
                <img src="@/assets/img/monitor/icon-6.png" alt="" />{{ v.show }}
              </p>
            </div>
            <div class="chamberBox">
              <div
                v-for="(vn, chamberData) in v.data"
                :key="chamberData"
                class="chamberCont"
              >
                <img :src="vn.img" alt="" class="logo" />
                <div>
                  <p class="name">{{ vn.name }}</p>
                  <p class="num">{{ vn.num }}<span class="piece">个</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </HerinContainer>
  </div>
</template>
<script>
import HerinContainer from '@/components/HerinContainer';

export default {
  components: {
    HerinContainer
  },
  data() {
    return {
      chamber: [
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          data: [
            {
              name: '容纳人数',
              num: '10',
              img: require('@/assets/img/monitor/icon-17.png')
            },
            {
              name: '防护物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-18.png')
            },
            {
              name: '医疗物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-19.png')
            },
            {
              name: '救援物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-20.png')
            }
          ]
        },
        {
          title: '2#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          data: [
            {
              name: '容纳人数',
              num: '10',
              img: require('@/assets/img/monitor/icon-17.png')
            },
            {
              name: '防护物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-18.png')
            },
            {
              name: '医疗物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-19.png')
            },
            {
              name: '救援物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-20.png')
            }
          ]
        },
        {
          title: '3#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          data: [
            {
              name: '容纳人数',
              num: '10',
              img: require('@/assets/img/monitor/icon-17.png')
            },
            {
              name: '防护物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-18.png')
            },
            {
              name: '医疗物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-19.png')
            },
            {
              name: '救援物资',
              num: '10',
              img: require('@/assets/img/monitor/icon-20.png')
            }
          ]
        }
      ],
      disasterData: [
        {
          title: '瓦斯避灾',
          num: '6'
        },
        {
          title: '水灾避灾',
          num: '5'
        },
        {
          title: '火灾避灾',
          num: '6'
        },
        {
          title: '顶板避灾',
          num: '4'
        }
      ]
    };
  }
};
</script>
<style lang="scss" scoped>
.MainCoal-box {
  &-tab {
    display: flex;
    .btn {
      @include btn;
    }
    .isbtn {
      background-color: rgba(0, 228, 255, 0.2);
      color: $cyan;
    }
  }
  &-content {
    .mouldbox {
      margin-top: 1.875rem;
    }
    .mouldbox:first-child {
      margin-top: 0.3125rem;
    }
  }
  .num {
    font-size: 16px;
    text-align: right;
    font-family: Helvetica-bold;
  }
  .piece {
    color: rgba(131, 131, 131, 100);
    font-size: 12px;
    text-align: left;
    font-family: Helvetica-regular;
    margin: 0 0.9375rem 0 0.3125rem;
    display: inline;
  }
  .sensorSum {
    display: flex;
    width: 20.625rem;
    justify-content: space-between;
    color: rgba(16, 16, 16, 100);
    font-size: 14px;
    margin-bottom: 0.9375rem;
    img {
      width: 1.25rem;
      margin: 0 0.75rem 0 0;
      height: 1.25rem;
    }
    p {
      display: flex;
      align-items: center;
    }
    .sum {
      color: rgba(248, 248, 248, 100);
      font-size: 14px;
      text-align: left;
      font-family: Helvetica-regular;
    }
  }
  .charttitle {
    font-size: 0.75rem;
    color: $light2Grey;
    margin: 0.625rem 0;
  }
  .broken {
    height: 2.375rem;
    width: 20.625rem;
    display: flex;
    justify-content: space-between;
    div {
      width: 10rem;
      border-radius: 2px;
      background-color: rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-left: 0.625rem;
    }
    .title {
      color: rgba(248, 248, 248, 100);
      font-size: 14px;
    }
    .num {
      color: rgba(0, 253, 255, 100);
      font-size: 16px;
      font-weight: 900;
    }
  }
  .sensorSort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    .chat {
      width: 8.5625rem;
      height: 7.4375rem;
    }
    .right {
      width: 8.125rem;
      height: 7.4375rem;
      display: flex;
      flex-direction: column;
      align-content: space-between;
      p {
        margin: 0;
      }
      .point {
        display: inline-block;
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
      }
      .title {
        color: rgba(173, 173, 173, 100);
        font-size: 12px;
        margin: 0 0.75rem 0 0.375rem;
        display: inline-block;
        width: 2.25rem;
      }
      .num {
        color: rgba(248, 248, 248, 100);
        font-size: 14px;
        margin-right: 0.3125rem;
      }
    }
  }
  .outage {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    div:nth-child(-n + 2) {
      margin-bottom: 0.9375rem;
    }
    div {
      width: 9.6875rem;
      height: 3.9375rem;
      background-color: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      p {
        text-align: center;
      }
      .title {
        color: rgba(248, 248, 248, 100);
        font-size: 14px;
        margin: 0.625rem 0 0.4rem 0;
      }
      .num {
        color: rgba(251, 218, 107, 100);
        font-size: 16px;
      }
    }
  }
  .cont:last-child {
    margin-bottom: 0;
  }
  .cont {
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    height: 202px;
    margin-bottom: 15px;
    padding: 20px;
    position: relative;
    .bord {
      position: absolute;
      width: 0.125rem;
      height: 0.875rem;
      background-color: rgba(87, 255, 170, .5);
      left: -0.125rem;
      top: .3125rem;
    }
    .head {
      display: flex;
      justify-content: space-between;
      img {
        width: 0.75rem;
        height: 0.75rem;
      }
      .title {
        color: rgba(248, 248, 248, 100);
        font-size: 16px;
      }
      .show {
        color: rgba(173, 173, 173, 100);
        font-size: 12px;
        width: 11.5625rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.1875rem;
      }
    }
    .chamberBox {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      .logo {
        width: 45px;
        height: 45px;
        margin-right: 10px;
      }
      .chamberCont {
        width: 40%;
        height: 45px;
        display: flex;
        margin-top: 25px;
        .name {
          color: rgba(248, 248, 248, 100);
          font-size: 14px;
        }
        .num {
          color: rgba(248, 248, 248, 100);
          font-size: 20px;
        }
      }
    }
  }
}
</style>
